"""
多维索引：
语法：
    data[1, 2, 3]   => 获取1轴第2行3列
    data[:, 1, :]   => 获取所有轴第1行
    data[:, :, 1]   => 获取所有轴第1列
"""
import torch as t

data = t.randint(1, 100, [4, 5, 7])
print("================= 原始数据 =================")
print(data)
print("================= data[1,2,3] =================")
print(data[1, 2, 3])
print("================= data[1,:,:] =================")
print(data[1, :, :])
print("================= data[:,1,:] =================")
print(data[:, 1, :])
print("================= data[:,:,1] =================")
print(data[:, :, 1])
